import 'package:flutter/material.dart';
import 'package:flutter_vant_ui/flutter_vant_ui.dart';

import '../../demos/demos.dart';

class VanDocDemoToastSection extends StatelessWidget {
  const VanDocDemoToastSection({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Toast")),
      body: SingleChildScrollView(
        child: Column(
          children: [
            const VanDocDemoBlockTitle(title: "基础用法", paddingTop: 20),
            VanCellGroup(inset: true, children: [
              VanCell(title: "文字提示", onClick: () => showToast()),
              VanCell(title: "加载提示", onClick: () => showLoadingToast("")),
              VanCell(title: "成功提示", onClick: () => showLoadingToast("提示内容")),
              VanCell(title: "失败提示", onClick: () => showLoadingToast("提示内容")),
            ]),
            //
            const VanDocDemoBlockTitle(title: "基础用法", paddingTop: 20),
            VanCellGroup(inset: true, children: [
              VanCell(title: "自定义图标", onClick: () => showToast()),
              VanCell(title: "自定义图片", onClick: () => showToast()),
              VanCell(title: "自定义加载图标", onClick: () => showToast()),
            ]),
            //
            const VanDocDemoBlockTitle(title: "基础用法", paddingTop: 20),
            VanCellGroup(inset: true, children: [
              VanCell(title: "顶部展示", onClick: () => showToast()),
              VanCell(title: "底部展示", onClick: () => showToast()),
            ]),
          ],
        ),
      ),
    );
  }
}
